function gcpick_flushwave(data, status, config)
if status.num<=0
    disp('Station is not selected');
    return;
end
figure(status.waveWindow);
unit = data(status.num);
t=(1:unit.npts)*unit.delta;
range = (t > status.cut(1)) & (t < status.cut(2));
wave = [unit.E, unit.N, unit.Z];
amp = max(sqrt(sum(wave(range, :).^2, 1)));
wave = wave/amp;
CHARSET={'-','0','+'};
comp = {'E', 'N', 'Z'};
clf;
linehandle = [];
for i = 1:3
    if contains( status.waveComponent, comp{i} )
        lt = line(t(range), wave(range,i)*status.amp+4-i, ...
            'Color', config.colorset{i}, ...
            'LineWidth', config.waveLineWidth, ...
            'DisplayName', comp{i});
        linehandle = [ linehandle, lt ];
    end
end
% line([min(t), max(t)],[0,0], 'Color', 'k');
% lim = max(max(abs(wave)));
% lim = [-1, 1]*lim*status.amp;
lim = [ 0, 4 ];
if unit.tp>0
    line([unit.tp, unit.tp], lim, ...
        'Color', 'k' );
    text(unit.tp, 0.8*lim(2), ' P');
end
if unit.ts>0
    line([unit.ts, unit.ts], lim, ...
        'Color', 'k' );
    text(unit.ts, 0.8*lim(2), ' S');
end
legend(linehandle);
grid on;
ax = gca;
ax.Box = 'on';
ax.YTickLabel = {};
infostr = cell(1,5);
infostr{1} = sprintf('Station:%s', data(status.num).station);
infostr{2} = sprintf('Tp:%.2fs', data(status.num).tp);
infostr{3} = sprintf('Ts:%.2fs', data(status.num).ts);
infostr{4} = 'Polarity';
infostr{5} = sprintf('%s  %s  %s', ...
    CHARSET{data(status.num).polar.E+2}, ...
    CHARSET{data(status.num).polar.N+2}, ...
    CHARSET{data(status.num).polar.Z+2});
infostr{6} = sprintf('Flag: %d', data(status.num).flag);
% title(infostr);
annotation( 'textbox', 'String',infostr, ...
    'FontSize', 12, 'Units','normalized', ...
    'Position', [0, .5, ax.Position(1), .5], ...
    'LineStyle','none');
end